package com.shinowit.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class SysOrgInfo implements Serializable {

    private String orgCode;

    private String orgName;

    private String parentOrgCode;

    public List<SysOrgInfo> children=new ArrayList<SysOrgInfo>();
    
    private static final long serialVersionUID = 1L;

    public String getOrgCode() {
        return orgCode;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_org_info.org_code
     *
     * @param orgCode the value for sys_org_info.org_code
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode == null ? null : orgCode.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_org_info.org_name
     *
     * @return the value of sys_org_info.org_name
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    public String getOrgName() {
        return orgName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_org_info.org_name
     *
     * @param orgName the value for sys_org_info.org_name
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    public void setOrgName(String orgName) {
        this.orgName = orgName == null ? null : orgName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_org_info.parent_org_code
     *
     * @return the value of sys_org_info.parent_org_code
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    public String getParentOrgCode() {
        return parentOrgCode;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_org_info.parent_org_code
     *
     * @param parentOrgCode the value for sys_org_info.parent_org_code
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    public void setParentOrgCode(String parentOrgCode) {
        this.parentOrgCode = parentOrgCode == null ? null : parentOrgCode.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_org_info
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysOrgInfo other = (SysOrgInfo) that;
        return (this.getOrgCode() == null ? other.getOrgCode() == null : this.getOrgCode().equals(other.getOrgCode()))
            && (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName()))
            && (this.getParentOrgCode() == null ? other.getParentOrgCode() == null : this.getParentOrgCode().equals(other.getParentOrgCode()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_org_info
     *
     * @mbg.generated Tue Sep 20 11:20:25 CST 2016
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrgCode() == null) ? 0 : getOrgCode().hashCode());
        result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().hashCode());
        result = prime * result + ((getParentOrgCode() == null) ? 0 : getParentOrgCode().hashCode());
        return result;
    }

	public List<SysOrgInfo> getChildren() {
		return children;
	}

	public void setChildren(List<SysOrgInfo> children) {
		this.children = children;
	}
}